﻿//Created by Action Script Viewer - http://www.buraks.com/asv
package net.wooga.pets.controllers {
    import net.wooga.pets.events.*;
    import net.wooga.pets.models.world.vos.*;
    import net.wooga.pets.interfaces.*;
    import org.robotlegs.mvcs.*;
    import net.wooga.pets.models.world.*;

    public class CollectCollectionRewardItemCommand extends Command {

        public var event:InfoEvent;
        public var worldModel:WorldModel;

        override public function execute():void{
            var _local2:RewardItemVO;
            var _local1:IRoom = (this.event.info as IRoom);
            var _local3:int;
            while (_local3 < _local1.rewardItems.length) {
                _local2 = _local1.rewardItems[_local3];
                if (this.event.id == _local2.id){
                    _local1.rewardItems.splice(_local3, 1);
                    log("collection item splice");
                    break;
                };
                _local3++;
            };
        }

    }
}//package net.wooga.pets.controllers 
